package com.zxw.设计模式.设计原则.里氏替换;

/**
 * @projectName: util-cloud
 * @package: com.zxw.设计模式.设计原则.里氏替换
 * @className: PromotionalStrategy
 * @author: zhangxuewei
 * @description: TODO
 * @date: 2023/4/24 16:37
 * @version: 1.0
 */
public class PromotionalStrategy implements Istrategy{

    @Override
    public double realPrice(double consumePrice) {
        if (consumePrice > 200) {
            return 200 + (consumePrice - 200) * 0.8;
        } else {
            return consumePrice;
        }
    }

}
